package kr.pe.osdev.bbs.model
{
	import com.adobe.cairngorm.model.ModelLocator;
	
	import mx.collections.ArrayCollection;

	[Bindable]
	public class BbsModelLocator implements ModelLocator{
		private static var modelLocator : BbsModelLocator;
		
		
		public function BbsModelLocator(){
			if(modelLocator != null){
				throw new Error("Only one BbsModelLocator instance should be instanticated");
			}
		}
		
		public static function getInstance():BbsModelLocator {
			if(modelLocator == null){
				modelLocator = new BbsModelLocator();
			}
			return modelLocator;
		}
		
		//View states 
		public var workflowState : Number = VIEWING_BBS_LIST;
		
		public static var VIEWING_BBS_LIST : Number = 0;
		public static var VIEWING_BBS_READ : Number = 1;
		public static var VIEWING_BBS_WRITE : Number = 2;
		public static var VIEWING_BBS_MODIFY : Number = 3; 
		
		//Model Values
		public var bbsList : ArrayCollection = new ArrayCollection();
	}
}